def random_code(len)
	chars = ("A".."F").to_a
	newcode = ""
	1.upto(len) { |i| newcode << chars[rand(chars.size-1)] }
	return newcode
end

text = Array.new
1.upto(5) do |i|
	col = rand(4);
	# create a random line...
	line = ""
	for i in 0..col
		line << random_code(1) << " "
	end
	text.push(line)
end

file = File.new("test.txt", "w")
text.each do |i|
	file.puts i
end

